#include <iostream>

using namespace std;

class A
{
public:
    A(){
        cout<<"A()"<<endl;
    }

    A(int):A()      //委托构造，调用A()
    {
        cout<<"A(int)"<<endl;
    }
};

class B: public A
{
    using A::A;     //继承构造函数，将类A的构造函数继承过来
};

int main()
{
    A a(5);
    B b(5);
}